package com.iplant.mes.service.po.sfc;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;
import com.iplant.base.utils.annotation.po.DBBasePO;

/**
 * 开工检查参数子项
 *
 * @author YouWang·Peng
 * 2024-1-2 09:23:56
 */
@DBBasePO(TableName = "sfc_task_param_item", Name = false, Active = false, Schemas = DBSchemas.MES,
        CheckName = {"Code", "TaskStartCheckID,PartPointParamID"}, CodeAuto = true, CodePrefix = "STPI-{yyyyMMdd}-")
public class SFCTaskParamItem extends BasePO {

    /**
     * 开工检查单ID
     */
    @DBCondition
    @DBField
    public int TaskStartCheckID = 0;

    @DBCondition
    @DBJoin(name = "TaskSelfID", tableName = "sfc_task_start_check", tableAsName = "sfc_task_start_check1", Schemas =
            DBSchemas.MES,
            MainTableField = "TaskStartCheckID")
    public int TaskSelfID = 0;

    /**
     * 工序参数ID
     */
    @DBCondition
    @DBField
    public int PartPointParamID = 0;

    /**
     * 产品参数
     */
    @DBJoin(name = "ProductParameter", tableName = "fpc_routepartpoint_parameter", tableAsName =
            "fpc_routepartpoint_parameter1", Schemas = DBSchemas.PDM,
            MainTableField = "PartPointParamID")
    public int ProductParameter = 0;

    /**
     * 工序参数名称
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            ConditionalJoin = "fpc_product_parameter1.ID=fpc_routepartpoint_parameter1.ProductParameter", JoinIndex = 2)
    public String ParamName = "";

    @DBCondition
    @DBJoin(name = "ParamType", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            ConditionalJoin = "fpc_product_parameter1.ID=fpc_routepartpoint_parameter1.ProductParameter", JoinIndex = 2)
    public int ParamType = 0;

    /**
     * 标准类型
     */
    @DBJoin(name = "StandardType", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            ConditionalJoin = "fpc_product_parameter1.ID=fpc_routepartpoint_parameter1.ProductParameter", JoinIndex = 2)
    public int StandardType = 0;
    /**
     * 标准类型文本
     */
    public String StandardTypeText = "";
    /**
     * 标准值
     */
    @DBJoin(name = "TheoreticalValue", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            ConditionalJoin = "fpc_product_parameter1.ID=fpc_routepartpoint_parameter1.ProductParameter", JoinIndex = 2)
    public String StandardValue = "";
    /**
     * 基准值
     */
    @DBJoin(name = "StandardBasic", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            ConditionalJoin = "fpc_product_parameter1.ID=fpc_routepartpoint_parameter1.ProductParameter", JoinIndex = 2)
    public String StandardBasic = "";
    /**
     * 默认值
     */
    @DBJoin(name = "DefaultValue", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            ConditionalJoin = "fpc_product_parameter1.ID=fpc_routepartpoint_parameter1.ProductParameter", JoinIndex = 2)
    public String DefaultValue = "";
    /**
     * 下限值
     */
    @DBJoin(name = "LowerTolerance", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1",
            Schemas
                    = DBSchemas.PDM,
            ConditionalJoin = "fpc_product_parameter1.ID=fpc_routepartpoint_parameter1.ProductParameter", JoinIndex = 2)
    public double StandardLeft = 0.0;
    /**
     * 上限值
     */
    @DBJoin(name = "UpperTolerance", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1",
            Schemas
                    = DBSchemas.PDM,
            ConditionalJoin = "fpc_product_parameter1.ID=fpc_routepartpoint_parameter1.ProductParameter", JoinIndex = 2)
    public double StandardRight = 0.0;

    /**
     * 关联采集编号（支持多个，逗号分隔）
     */
    @DBJoin(name = "CollectionNumber", tableName = "fpc_routepartpoint_parameter", tableAsName =
            "fpc_routepartpoint_parameter1", Schemas = DBSchemas.PDM,
            MainTableField = "PartPointParamID")
    public String CollectionNumber = "";

    /**
     * 参数值
     */
    @DBField
    public String ParamValue = "";

    /**
     * 工位ID
     */
    @DBCondition
    @DBField
    public int StationID = 0;

    /**
     * 工位名称
     */
    @DBJoin(name = "Name", tableName = "fmc_station", tableAsName = "fmc_station1", Schemas = DBSchemas.Basic,
            MainTableField = "StationID")
    public String StationName = "";

    /**
     * 检查结果
     */
    @DBField
    public int CheckResult = 0;

    /**
     * 单位ID
     */
    @DBJoin(name = "UnitID", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            ConditionalJoin = "fpc_product_parameter1.ID=fpc_routepartpoint_parameter1.ProductParameter", JoinIndex = 2)
    public int UnitID = 0;
    /**
     * 单位名称
     */
    @DBJoin(name = "Name", tableName = "mss_unit", tableAsName = "mss_unit1", Schemas = DBSchemas.Basic,
            ConditionalJoin = "mss_unit1.ID=fpc_product_parameter1.UnitID", JoinIndex = 3)
    public String UnitName = "";
    /**
     * 单位编码
     */
    @DBJoin(name = "Code", tableName = "mss_unit", tableAsName = "mss_unit1", Schemas = DBSchemas.Basic,
            ConditionalJoin = "mss_unit1.ID=fpc_product_parameter1.UnitID", JoinIndex = 3)
    public String UnitCode = "";

    /**
     * 设备编号（辅助属性）
     */
    public String DeviceCode = "";
    /**
     * 设备名称（辅助属性）
     */
    public String DeviceName = "";

    /**
     *参数编号（辅助属性）
     */
    public String ParamCode = "";
    /**
     *参数代码（辅助属性）
     */
    public String VariableName = "";

    @JsonProperty("TaskStartCheckID")
    public int getTaskStartCheckID() {
        return TaskStartCheckID;
    }

    public void setTaskStartCheckID(int taskStartCheckID) {
        TaskStartCheckID = taskStartCheckID;
    }

    @JsonProperty("PartPointParamID")
    public int getPartPointParamID() {
        return PartPointParamID;
    }

    public void setPartPointParamID(int partPointParamID) {
        PartPointParamID = partPointParamID;
    }

    @JsonProperty("ProductParameter")
    public int getProductParameter() {
        return ProductParameter;
    }

    public void setProductParameter(int productParameter) {
        ProductParameter = productParameter;
    }

    @JsonProperty("ParamName")
    public String getParamName() {
        return ParamName;
    }

    public void setParamName(String paramName) {
        ParamName = paramName;
    }

    @JsonProperty("ParamType")
    public int getParamType() {
        return ParamType;
    }

    public void setParamType(int paramType) {
        ParamType = paramType;
    }

    @JsonProperty("StandardType")
    public int getStandardType() {
        return StandardType;
    }

    public void setStandardType(int standardType) {
        StandardType = standardType;
    }

    @JsonProperty("StandardTypeText")
    public String getStandardTypeText() {
        return StandardTypeText;
    }

    public void setStandardTypeText(String standardTypeText) {
        StandardTypeText = standardTypeText;
    }

    @JsonProperty("StandardValue")
    public String getStandardValue() {
        return StandardValue;
    }

    public void setStandardValue(String standardValue) {
        StandardValue = standardValue;
    }

    @JsonProperty("StandardBasic")
    public String getStandardBasic() {
        return StandardBasic;
    }

    public void setStandardBasic(String standardBasic) {
        StandardBasic = standardBasic;
    }

    @JsonProperty("DefaultValue")
    public String getDefaultValue() {
        return DefaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        DefaultValue = defaultValue;
    }

    @JsonProperty("StandardLeft")
    public double getStandardLeft() {
        return StandardLeft;
    }

    public void setStandardLeft(double standardLeft) {
        StandardLeft = standardLeft;
    }

    @JsonProperty("StandardRight")
    public double getStandardRight() {
        return StandardRight;
    }

    public void setStandardRight(double standardRight) {
        StandardRight = standardRight;
    }

    @JsonProperty("CollectionNumber")
    public String getCollectionNumber() {
        return CollectionNumber;
    }

    public void setCollectionNumber(String collectionNumber) {
        CollectionNumber = collectionNumber;
    }

    @JsonProperty("ParamValue")
    public String getParamValue() {
        return ParamValue;
    }

    public void setParamValue(String paramValue) {
        ParamValue = paramValue;
    }

    @JsonProperty("StationID")
    public int getStationID() {
        return StationID;
    }

    public void setStationID(int stationID) {
        StationID = stationID;
    }

    @JsonProperty("StationName")
    public String getStationName() {
        return StationName;
    }

    public void setStationName(String stationName) {
        StationName = stationName;
    }

    @JsonProperty("CheckResult")
    public int getCheckResult() {
        return CheckResult;
    }

    public void setCheckResult(int checkResult) {
        CheckResult = checkResult;
    }

    @JsonProperty("UnitID")
    public int getUnitID() {
        return UnitID;
    }

    public void setUnitID(int unitID) {
        UnitID = unitID;
    }

    @JsonProperty("UnitName")
    public String getUnitName() {
        return UnitName;
    }

    public void setUnitName(String unitName) {
        UnitName = unitName;
    }

    @JsonProperty("UnitCode")
    public String getUnitCode() {
        return UnitCode;
    }

    public void setUnitCode(String unitCode) {
        UnitCode = unitCode;
    }

    @JsonProperty("TaskSelfID")
    public int getTaskSelfID() {
        return TaskSelfID;
    }

    public void setTaskSelfID(int taskSelfID) {
        TaskSelfID = taskSelfID;
    }

    @JsonProperty("DeviceCode")
    public String getDeviceCode() {
        return DeviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        DeviceCode = deviceCode;
    }

    @JsonProperty("DeviceName")
    public String getDeviceName() {
        return DeviceName;
    }

    public void setDeviceName(String deviceName) {
        DeviceName = deviceName;
    }

    @JsonProperty("ParamCode")
    public String getParamCode() {
        return ParamCode;
    }

    public void setParamCode(String paramCode) {
        ParamCode = paramCode;
    }

    @JsonProperty("VariableName")
    public String getVariableName() {
        return VariableName;
    }

    public void setVariableName(String variableName) {
        VariableName = variableName;
    }
}
